import * as vscode from "vscode";
import { getChineseList } from "./get-Chinese-list";

// TODO10：完善查找中文命令
export function findChinese() {
  const document = vscode.window.activeTextEditor?.document;

  const text = document?.getText();
  const currentFilename = document?.fileName;
  const targetStrs = getChineseList(text as string, currentFilename as string);

  // vscode.window
  //   .showQuickPick(targetStrs.map((item) => item.text))
  //   .then((item) => {
  //     const range = targetStrs.find((str) => str.text === item)?.range;
  //     const editor = vscode.window.activeTextEditor;
  //     if (editor) {
  //       editor.revealRange(range, vscode.TextEditorRevealType.InCenter);
  //     }
  //   });
}
